package com.logic.system.persistence.read;

import java.util.List;
import java.util.Map;

import com.logic.common.util.QueryUtil;
import com.logic.common.ws.dto.configuration.UserEmployeeDTO;
import com.logic.common.ws.dto.system.UserDTO;
import com.logic.common.ws.dto.system.UserSearchDTO;
import com.logic.landseaserver.ws.dto.PersonInfoDTO;
import com.logic.landseaserver.ws.dto.UserPrjRoleDTO;
import com.logic.system.domain.User;
import com.logic.system.domain.UserArea;
import com.logic.system.domain.UserOrg;
import com.logic.system.domain.UserProject;
import com.logic.system.domain.UserRole;
import com.logic.system.ws.dto.UserRoleDTO;

public interface UserReadMapper {

    User selectByPrimaryKey(Integer id);

    int checkLoginIdUnique(String loginID);

    List<UserDTO> selectUsers(QueryUtil queryUtil);

    User selectByLoginId(String loginId);

    List<UserDTO> quickFind(String name);

    List<UserEmployeeDTO> getUserEmployee(QueryUtil queryUtil);

    List<UserSearchDTO> getAllSearchUser();

    List<UserOrg> selectOrgByUserId(Integer userId);

    List<UserRole> getUserRolesByUserId(Integer userId);

    List<UserArea> selectAreaByUserId(Integer userId);

    List<UserProject> selectProjectByUserId(Integer userId);

    List<UserProject> selectProjectBySelective(UserProject userProject);

    List<User> selectAllUserByRoleId(Integer roleId);

    List<User> selectUsersByRoleCode(String code);

    Integer selectFactoryManagerId(String installVendorId);

    List<User> getAllUserByOrgID(Integer orgID);

	List<String> getUserLoginIdsByIds(String userIDs);

	UserDTO getUserDTO(String id);

    String validateLoginId(String loginId);

    String selectPhoneByLoginId(String loginId);

    UserPrjRoleDTO getPrjsAndRole(Integer userId);
    
    // 查询用户所有角色
    List<UserRoleDTO> getUserRolesWithCodeByUserId(Integer userId);
    
    // 查询有权限审核的人员，用来发短信
    List<PersonInfoDTO> getApprovalAuthPersionInfo(Map<String,Object> paramMap);
    
    // Dding门锁电池电量低以及门锁离线发送短信给店长
    List<PersonInfoDTO> getDdingEvtPersionInfo(Map<String,Object> paramMap);
}
